//
//  YGFoodDetailTableCell.m
//  yuanshangyiliao
//
//  Created by admin on 2021/4/30.
//

#import "YGFoodDetailTableCell.h"
#import "YGFormTableView.h"

@interface YGFoodDetailTableCell ()
@property (nonatomic, strong) YGFormTableView *tableView;
@end

@implementation YGFoodDetailTableCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self.contentView addSubview:self.tableView];
        [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.offset(0);
            make.top.bottom.offset(0);
            make.height.offset(0);
        }];
    }
    return self;
}

- (void)setDatas:(NSArray<YGFoodDetailModelItem *> *)datas {
    _datas = datas;
//    [self.tableView configureData:datas];
    [self.tableView mas_updateConstraints:^(MASConstraintMaker *make) {
        make.height.offset(datas.count*30);
    }];
}

#pragma mark - Getter

- (YGFormTableView *)tableView
{
    if(!_tableView){
        YGFromTableConfigure *config = [[YGFromTableConfigure alloc] init];
        _tableView = [[UIView alloc] init];
//        config.headerConfigure

    }
    return _tableView;
}

@end
